﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GMaps
{
    [Serializable]
    public class GLatLng
    {
        public GLatLng() { }

        public GLatLng(float latitude, float longitude)
        {
            Latitude = latitude;
            Longitude = longitude;
        }
        
        public float Latitude { get; set; }
        public float Longitude { get; set; }
        public string Id { get; set; }

        public string Render()
        {
            return "google.maps.LatLng(" + Latitude.ToString().Replace(",", ".") + ", " + Longitude.ToString().Replace(",", ".") + ")";
        }
        public string RenderJson()
        {
            return "{\"Lat\":" + Latitude.ToString().Replace(",", ".") + ", \"Lng\":" + Longitude.ToString().Replace(",", ".") + "}";
        } 
    }

    
}


